package com.ruoyi.ade.llm.utils;

import com.alibaba.fastjson2.JSONArray;

import java.util.ArrayList;
import java.util.List;

public class Test {

    public static void main(String[] args) {
        List<String> drugs = new ArrayList<>();
        drugs.add("化疗药物");
        drugs.add("化疗");
        drugs.add("阿司匹林");
        for(int i=0;i<drugs.size();i++){
            if(drugs.get(i).contains("化疗")) drugs.set(i,"化疗药");
        }
        System.out.println(JSONArray.toJSONString( drugs));
    }
}
